*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    display: flex;
    flex-direction: column;
    justify-content:center ;
    align-items: center;

    background: rgb(187, 223, 179);
    /* 隐藏滚动条*/
    overflow-x: hidden;
    
}
h1{
    margin: 10px;
}
.box{
    display: flex;
    justify-content: center;
    align-items:center;
    margin: 18px;
    width: 400px;
    height: 200px;
    background-color: rgb(129, 119, 218);
    border-radius: 20px;
    box-shadow: 0 12px 10px rgba(0,0,0,0.6);

}
.box:nth-of-type(even){
    /* 位移处理 */
    transform: translateX(400%);
    transition: all 0.7s ease;
}
.box:nth-of-type(odd){
    /* 位移处理 */
    transform: translateX(-400%);
    transition: all 0.7s ease;
}
.box h2{
    color: white;
    font-size: 30px;
}
.box.active{
    transition: all 0.7s ease;
    transform: translateX(0);
}
